-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add source links to creator pages #3780
Conversation
frontend/src/components/VCollectionHeader/VCollectionHeader.vue
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, that's not quite what I had in mind, sorry I should have been more explicit! I was thinking of linking to our own source view, using the link with the little institution icon we have 😮 What do you think?
@fcoveram, this was how I first understood this suggestion, and then I saw the mockup and added the link to the source site. |
Oh, now I understand. And yes, it makes more sense linking to the source view as this page has a button to the external site on the far right side. I considered that option but read the sentence twice and understood we wanted to link the external source, but jumping between Openverse views make more sense. I tried a few things that tap into a spacing improvement suggestion I shared time ago (in a ticket I can not find), and it looks like this. Adding the small button next to results label on creator page requires a spacing update in the three views on desktop, but the change is minor and only impacts the results label area. But on small breakpoints, the changes involve more elements as the header variants (source, creator, and tag) initially designed have a I do not want to creep the PR scope, but worth discussing how this proposal feels to us, and if we agree on going with it, what changes belong to this ticket scope. |
That design for the wider viewports was exactly what I had in mind Francisco! On the smaller breakpoints, do you think it would make sense to break the source over to a new line, separate from the results count text? |
You are right @AetherUnbound, I don't know why I didn't consider that option. Here is the new version and other spacing tweaks to the rest of views to keep consistency. Note that single result changes the small button style and one padding-left value. Curious to hear @obulat's thought on this idea. |
I like the latest version where the source link is on a separate line. However, still having it as a sentence, split into 2 lines, might be a problem for accessibility because the sentence will be split into two, and a user who has a screen reader might not understand what it means. Did we replace the "tag"/"source"/"creator" icon with the word on mobile? |
True, thanks for noticing it. I think we can change the copy to something like
Yes. And in the single result page, the small buttons change from |
518fb01
to
f8a41b0
Compare
I updated the mockups and added dev notes. |
40c7f7f
to
c93e83f
Compare
Full-stack documentation: https://docs.openverse.org/_preview/3780 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
c93e83f
to
59c9a44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look great. I have just three comments:
Small breakpoints
- The external link in Creator and Source pages needs to be full-width.
- The results label in Tag and Source pages needs to have a padding bottom of
8px
to reach the the total spacing of16px
. Figma dev notes show this more clearly and this is the element I'm referring to.
Bigger breakpoints
- The results label in Tag page needs to be inside an area of
32px
height. Figma dev notes show this more clearly.
59c9a44
to
5abb04a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice; lgtm. It is behaving correctly in multiple browsers in MacOS and Linux on my local machines. Tested in Firefox, Safari, and Chrome.
I checked the last changes and it looks perfect ✨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great ✨ 🚀
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
e566cd0
to
769de3f
Compare
Fixes
Fixes #3496 by @AetherUnbound
Description
This PR updates the collection header component to match the updated designs.
The creator page has a scrollable area with a button linking to the source page in Openverse.
On narrow screens, the icons next to the
h1
heading are replaced with the words. To make this heading accessible, I wrapped theh1
around the icon/collection name, as well as the name of the tag/source/creator. This is not perfect, especially for i18n, but it gives the screen reader user a better context.The newly-added source button is scrollable to allow for long source names. To implement this, I extracted the scrolling features from
VByLine
into a separate component, and reused it for this button as well. Some of the extra margin/padding values were added to keep the height of the button correct while also making the focus ring visible (this is a problem for buttons in containers that have overflow set to anything other than visible.This PR adds a link to the creator view results label. Due to limitations in how v.8 vue-i18n'si18n
functional component works, we cannot use it with the pluralization settings (we need pluralization because the label has "x results"). This is why I didn't use<i18n path="the creator label">
but created a workaround splitting the creator result label by the source name instead.Testing Instructions
Go to
/preferences
page and make sure theadditional_search_views
switch ison
.Go to a single result page, and click on a creator link button underneath the image or audio. On the source view, you should see the link to a source with an "external link" icon next to it. When you click it, you should see an analytics event logged in the console (and should see the source page open in a new tab).
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin